create external table jms_dm.dm_day_deliver_aging_dt 
(
virt_code   string COMMENT '虚拟代理区code' ,
virt_name   string COMMENT '虚拟代理区' ,
agent_code   string COMMENT '代理区code' ,
agent_name   string COMMENT '代理区' ,
fran_code    string COMMENT '加盟商code' ,
fran_name    string COMMENT '加盟商' ,
code   string COMMENT '网点code' ,
name     string COMMENT '网点' ,
active_deliver_sum   string COMMENT '实际出仓数量' ,
plan_delver_sum       string COMMENT '计划出仓数量' ,
active_deliver_09    string COMMENT '实际九点前出仓数量' ,
active_deliver_10    string COMMENT '实际十点前出仓量' ,
active_deliver_11    string COMMENT '实际11点前出仓量' ,
active_deliver_12    string COMMENT '实际12点前出仓量' ,
plan_delver_hour_09   string COMMENT '规划9点前出仓量' ,
plan_delver_hour_10    string COMMENT '规划9点前出仓量' ,
plan_delver_hour_11     string COMMENT '规划9点前出仓量' ,
plan_delver_hour_12     string COMMENT '规划9点前出仓量' ,
date_time   string COMMENT '业务日期',
regional_id   string comment '管理大区id',
regional_desc string comment '管理大区',
order_source_code string comment '订单来源code'
,order_source_name string comment '订单来源'
 ,plan_active_deliver_09   int comment '规划签收九点前实际出仓量'
 )
comment '出仓当日时效签收监控'
PARTITIONED BY ( dt string COMMENT '时间分区')
stored as parquet
LOCATION '/dw/hive/jms_dm.db/external/dm_day_deliver_aging_dt'
TBLPROPERTIES (     'discover.partitions' = 'false',  'parquet.column.index.access' = 'true');

 alter table jms_dm.dm_day_deliver_aging_dt add columns (
 plan_active_deliver_10   int comment '规划签收十点前实际出仓量',
 plan_active_deliver_11   int comment '规划签收十亿点前实际出仓量',
 plan_active_deliver_12   int comment '规划签收十二点前实际出仓量'
)cascade;